package com.pand;

import com.pand.netty.NettyServer;
import com.pand.task.OrderTask;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@EnableScheduling
public class ThirdServiceApplication {

    @Bean(initMethod = "init")
    public NettyServer nettyServer() {
        return new NettyServer();
    }

    @Bean(initMethod = "init")
    public OrderTask OrderTask() {
        return new OrderTask();
    }

    public static void main(String[] args) {
        SpringApplication.run(ThirdServiceApplication.class, args);
    }
}
